package org.toycode.solr.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Dummy entity.
 *
 * @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
 * @version 1.0.0.5, Aug 27, 2009
 */
public class Dummy1 extends AbstractEntity implements Serializable {

    private static final long serialVersionUID = 1L;
    private Long id;
    private String title;
    private List<Dummy2> dummy2s;
    private List<String> strings;
    private List<String> msWordFilePaths;
    private List<String> textFilePaths;
    private String pdfFilePath;
    private String msExcelFilePath;

    public Dummy1() {
        dummy2s = new ArrayList<Dummy2>();
        strings = new ArrayList<String>();
        msWordFilePaths = new ArrayList<String>();
        textFilePaths = new ArrayList<String>();

        for (int i = 0; i < 10; i++) {
            final Dummy2 d2 = new Dummy2();
            d2.setLeadName("lead " + i);
            dummy2s.add(d2);

            strings.add("string " + i);
        }
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getMsExcelFilePath() {
        return msExcelFilePath;
    }

    public void setMsExcelFilePath(String msExcelFilePath) {
        this.msExcelFilePath = msExcelFilePath;
    }

    public String getPdfFilePath() {
        return pdfFilePath;
    }

    public void setPdfFilePath(String pdfFilePath) {
        this.pdfFilePath = pdfFilePath;
    }

    public List<String> getTextFilePaths() {
        return textFilePaths;
    }

    public void setTextFilePaths(List<String> textFilePaths) {
        this.textFilePaths = textFilePaths;
    }

    public List<String> getMsWordFilePaths() {
        return msWordFilePaths;
    }

    public void setMsWordFilePaths(List<String> msWordFilePaths) {
        this.msWordFilePaths = msWordFilePaths;
    }

    public List<String> getStrings() {
        return strings;
    }

    public void setStrings(List<String> strings) {
        this.strings = strings;
    }

    public List<Dummy2> getDummy2s() {
        return dummy2s;
    }

    public void setDummy2s(List<Dummy2> dummy2s) {
        this.dummy2s = dummy2s;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        if (!(object instanceof Dummy1)) {
            return false;
        }
        Dummy1 other = (Dummy1) object;
        if ((this.id == null && other.id != null) || (this.id != null &&
                                                      !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "ory.toycode.solr.entity.Dummy1[id=" + id + "]";
    }
}
